import request from '@/utils/request'

// 查询优惠券作用范围信息列表
export function listScope(query) {
  return request({
    url: '/market/scope/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券作用范围信息详细
export function getScope(id) {
  return request({
    url: '/market/scope/' + id,
    method: 'get'
  })
}

// 新增优惠券作用范围信息
export function addScope(data) {
  return request({
    url: '/market/scope',
    method: 'post',
    data: data
  })
}

// 修改优惠券作用范围信息
export function updateScope(data) {
  return request({
    url: '/market/scope',
    method: 'put',
    data: data
  })
}

// 删除优惠券作用范围信息
export function delScope(id) {
  return request({
    url: '/market/scope/' + id,
    method: 'delete'
  })
}
